Optimal. Leaf size=51 \[ \frac{1}{2} x^2 \left (a^2-b^2\right )-\frac{a b \log \left (\cos \left (c+d x^2\right )\right )}{d}+\frac{b^2 \tan \left (c+d x^2\right )}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0470521, antiderivative size = 51, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {3747, 3477, 3475} \[ \frac{1}{2} x^2 \left (a^2-b^2\right )-\frac{a b \log \left (\cos \left (c+d x^2\right )\right )}{d}+\frac{b^2 \tan \left (c+d x^2\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3747
Rule 3477
Rule 3475
Rubi steps
\begin{align*} \int x \left (a+b \tan \left (c+d x^2\right )\right )^2 \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int (a+b \tan (c+d x))^2 \, dx,x,x^2\right )\\ &=\frac{1}{2} \left (a^2-b^2\right ) x^2+\frac{b^2 \tan \left (c+d x^2\right )}{2 d}+(a b) \operatorname{Subst}\left (\int \tan (c+d x) \, dx,x,x^2\right )\\ &=\frac{1}{2} \left (a^2-b^2\right ) x^2-\frac{a b \log \left (\cos \left (c+d x^2\right )\right )}{d}+\frac{b^2 \tan \left (c+d x^2\right )}{2 d}\\ \end{align*}
Mathematica [C] time = 0.175392, size = 75, normalized size = 1.47 \[ \frac{2 b^2 \tan \left (c+d x^2\right )-i \left ((a+i b)^2 \log \left (-\tan \left (c+d x^2\right )+i\right )-(a-i b)^2 \log \left (\tan \left (c+d x^2\right )+i\right )\right )}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 72, normalized size = 1.4 \begin{align*}{\frac{{b}^{2}\tan \left ( d{x}^{2}+c \right ) }{2\,d}}+{\frac{ab\ln \left ( 1+ \left ( \tan \left ( d{x}^{2}+c \right ) \right ) ^{2} \right ) }{2\,d}}+{\frac{\arctan \left ( \tan \left ( d{x}^{2}+c \right ) \right ){a}^{2}}{2\,d}}-{\frac{\arctan \left ( \tan \left ( d{x}^{2}+c \right ) \right ){b}^{2}}{2\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.03116, size = 201, normalized size = 3.94 \begin{align*} \frac{1}{2} \, a^{2} x^{2} - \frac{{\left (d x^{2} \cos \left (2 \, d x^{2} + 2 \, c\right )^{2} + d x^{2} \sin \left (2 \, d x^{2} + 2 \, c\right )^{2} + 2 \, d x^{2} \cos \left (2 \, d x^{2} + 2 \, c\right ) + d x^{2} - 2 \, \sin \left (2 \, d x^{2} + 2 \, c\right )\right )} b^{2}}{2 \,{\left (d \cos \left (2 \, d x^{2} + 2 \, c\right )^{2} + d \sin \left (2 \, d x^{2} + 2 \, c\right )^{2} + 2 \, d \cos \left (2 \, d x^{2} + 2 \, c\right ) + d\right )}} + \frac{a b \log \left (\sec \left (d x^{2} + c\right )\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.62378, size = 113, normalized size = 2.22 \begin{align*} \frac{{\left (a^{2} - b^{2}\right )} d x^{2} - a b \log \left (\frac{1}{\tan \left (d x^{2} + c\right )^{2} + 1}\right ) + b^{2} \tan \left (d x^{2} + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.436217, size = 65, normalized size = 1.27 \begin{align*} \begin{cases} \frac{a^{2} x^{2}}{2} + \frac{a b \log{\left (\tan ^{2}{\left (c + d x^{2} \right )} + 1 \right )}}{2 d} - \frac{b^{2} x^{2}}{2} + \frac{b^{2} \tan{\left (c + d x^{2} \right )}}{2 d} & \text{for}\: d \neq 0 \\\frac{x^{2} \left (a + b \tan{\left (c \right )}\right )^{2}}{2} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.22416, size = 72, normalized size = 1.41 \begin{align*} \frac{{\left (d x^{2} + c\right )} a^{2} -{\left (d x^{2} + c - \tan \left (d x^{2} + c\right )\right )} b^{2} - 2 \, a b \log \left ({\left | \cos \left (d x^{2} + c\right ) \right |}\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]